package learning.chat_between_us;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.Socket;

public class Read_msg_Thread extends Thread {
	Socket s = null;
    
	public Read_msg_Thread(Socket s) {
		super();
		this.s = s;
	}

	@Override
	public void run() {
		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(
					s.getInputStream()));
			while (true) {
				System.out.println(br.readLine());
			}

		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
